package com.rc.saas.tenant.service.market;


import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.base.BaseSearch;
import com.rc.saas.tenant.base.BaseService;
import com.rc.saas.tenant.mapper.market.MarketActivityMapper;
import com.rc.saas.tenant.model.market.MarketActivity;
import com.rc.saas.tenant.model.market.MarketActivityExample;
import com.rc.saas.tenant.model.market.MarketActivityMemberInfo;
import com.rc.saas.tenant.model.market.MarketActivityTicket;
import com.rc.saas.tenant.search.activity.ActivityMemberSearch;
import com.rc.saas.tenant.search.market.MarketSearch;
import com.rc.saas.tenant.vo.market.MarketActivityDiscountVo;
import com.rc.saas.tenant.vo.market.MarketActivityRecordVo;
import com.rc.saas.tenant.vo.market.MarketActivityVo;

import java.text.ParseException;
import java.util.List;

public interface MarketActivityService extends BaseService<Long, MarketActivity, MarketActivityExample, MarketActivityMapper> {

    MarketActivityVo selectMarketActivityByTenantCode(String tenantCode);

    PageInfo<MarketActivity> listPageRechargeDiscount(BaseSearch baseSearch, String startTime, String endTime) throws ParseException;

    Boolean isExecuteDiscount(Long marketActivityId, String tenantCode, Integer aliPay, Integer wxPay, Integer unPay, Integer abcPay,Integer isApp,Integer isWx);

    MarketActivityDiscountVo selectDiscountAndTicket(Long marketActivityId);

    void insertDiscount(MarketActivity marketActivity, List<MarketActivityTicket> marketActivityTicketList);

    void updateDiscount(MarketActivity marketActivity, List<MarketActivityTicket> marketActivityTicketList);

    PageInfo<MarketActivityRecordVo> listPageMarketActivityRecord(BaseSearch baseSearch, String beginTime, String endTime);

    void insertMarketActivity(MarketActivity marketActivity);

    void updateMarketActivity(MarketActivity marketActivity);

    void updateMarketActivityStatus(MarketActivity marketActivity);

    PageInfo<MarketActivity> listPageMarketActivity(MarketSearch marketSearch);

    PageInfo<MarketActivityMemberInfo> listPageActivityMemberInfo(ActivityMemberSearch activityMemberSearch);

    JSONObject getMarKetStatistics(String isDayMonth);

    int saveMarketActivity(MarketActivity marketActivity);

    MarketActivity findById(Long id);
}